﻿using Loki.Commands;
using Loki.IoC;
using Loki.IoC.Registration;

namespace Loki.Utils
{
    internal class LokiServicesInstaller : LokiContextInstaller
    {
        public override void Install(IObjectContext context)
        {
            context.Register(Element.Service<IErrorComponent, LokiErrorService>());
            context.Register(Element.Service<ICommandComponent, LokiCommandService>());
            context.Register(Element.Service<IEventComponent, LokiEventService>());
            context.Register(Element.Service<ITaskComponent, LokiTaskService>());
            context.Register(Element.Service<ISettingsComponent, LokiSettingsService>());
            context.Register(Element.Service<IMessageComponent, MessageBus>());
            context.Register(Element.For<CommandManager>().Lifestyle.Transient);
        }
    }
}